<script setup>
import {nextTick, onMounted, ref} from "vue";
  import webWorker from './components/web-work.vue'
  const childeRef = ref(null)
  import { useStore } from 'vuex'
  const store = useStore()
  // store.commit('insertname','ggggggg')
  store.dispatch('store1/insertname','回到家卡仕达酱卡了的哈市')
  // emit用法
  function parenteEmit(data){
    console.log(data)
  }

  // 不更新获取不到子组件的数据
  nextTick(()=>{
    // console.log(childeRef.value.name)
  })


  const hasInfoArray = [{
    startTime:'2024-12-02 10:11:35',
    endTime:'2024-12-02 10:16:35'
  },{
    startTime:'2024-12-02 13:22:35',
    endTime:'2024-12-02 13:36:35'
  },{
    startTime:'2024-12-03 09:22:35',
    endTime:'2024-12-03 10:36:35'
  }]

</script>

<template>
<!--  <div>{{ store.state.store1.name }}</div>-->
<!--  <backPlayer ref="childeRef" initDate="2024-12-03 10:50:45" :timeData="hasInfoArray" msg="Vite + Vue" @parenteEmit="parenteEmit" />-->
  <webWorker></webWorker>
</template>

<style lang="scss" scoped>

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}
</style>
